package com.weimob.mcloud.wechatwork.customer.enums;

import lombok.Getter;
import lombok.Setter;

/**
 * 1-个人sop ，2-企业群发 ，3-话术库 ，4-客户裂变 ， 5-标签建群 ， 6-侧边栏发商品 ， 7-侧边栏发优惠券
 */
public enum TouchTaskTypeEnum {

    SOP(1, "个人sop", "sopTaskTouchImpl"),
    WECHAT_GROUP(2, "企业群发", "sendTaskTouchImpl"),
    WORDS(3, "话术库", "speechCraftTouchImpl"),
    FISSION(4, "客户裂变", "fissionTouchImpl"),
    TAG_GROUP(5, "标签建群", "tagGroupTouchImpl"),
    GOODS(6, "侧边栏发商品", "goodsTouchImpl"),
    COUPONS(7, "侧边栏发优惠券", "couponTouchImpl");


    /*****
     * code 码
     */
    @Setter
    @Getter
    private int code;
    /*****
     * 说明
     */
    @Setter
    @Getter
    private String desc;


    @Setter
    @Getter
    private String implClassName;


    TouchTaskTypeEnum(int code, String desc, String implClassName) {
        this.code = code;
        this.desc = desc;
        this.implClassName = implClassName;
    }

    public static TouchTaskTypeEnum getEnumByCode(int code) {
        for (TouchTaskTypeEnum touchTaskTypeEnum : TouchTaskTypeEnum.values()) {
            if (touchTaskTypeEnum.code == code) {
                return touchTaskTypeEnum;
            }
        }
        return null;
    }
}
